Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPLAT-15507: ddev should use new dart CLI #362

Merged
merged 20 commits into from
Oct 15, 2021
Merged

Conversation

annawatson-wk
Copy link
Contributor

@annawatson-wk annawatson-wk commented Oct 12, 2021

Purpose:

ddev analyze runs dartanalyzer, which does not leverage the analysis server
ddev format may run dartfmt (unless the package depends on dart_style)
in several places, ddev will run other dart executables via pub run
As of Dart 2.10 (https://medium.com/dartlang/announcing-dart-2-10-350823952bd5), there exists a new unified dart CLI with improved options for analysis, formatting, and running packages. The primary benefit to this new CLI is dart analyze which (like tuneup) uses the analysis server, which is important because the now-outdated dartanalyzer suffers from several deficiences and bugs because it doesn't use the analysis server.

Note: dart_dev also provides a tuneup-based option for analysis. There does still seem to be some functionality in tuneup that doesn't exist in dart analyze, but its future is unclear. We can probably leave the tuneup tool in place, but recommend that the default AnalyzeTool be used once it is updated to use dart analyze.

Acceptance Criteria

  • Update AnalyzeTool to have the option to run dart analyze instead of dartanalyzer
  • Update FormatTool to have the option run dart format instead of dartfmt (this shouldn't change the scenario when dart_style is used)
  • Update any usage of pub run to dart run/ except dart test
  • Update any usage of pub global to dart pub global
  • Update any usage of pub <get|upgrade> to dart pub <get|upgrade>
  • Update any applicable references to outdated CLI commands in the README and documentation guides

@aviary2-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

lib/src/tools/analyze_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/analyze_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/analyze_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/analyze_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/analyze_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/analyze_tool.dart Show resolved Hide resolved
lib/src/tools/format_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/format_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/format_tool.dart Outdated Show resolved Hide resolved
test/tools/analyze_tool_test.dart Outdated Show resolved Hide resolved
lib/src/utils/global_package_is_active_and_compatible.dart Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lib/src/tools/analyze_tool.dart Outdated Show resolved Hide resolved
test/tools/analyze_tool_test.dart Outdated Show resolved Hide resolved
test/tools/analyze_tool_test.dart Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@annawatson-wk annawatson-wk marked this pull request as ready for review October 14, 2021 19:02
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
lib/src/tools/test_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/test_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/test_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/test_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/test_tool.dart Outdated Show resolved Hide resolved
lib/src/tools/test_tool.dart Show resolved Hide resolved
tool/dart_dev/config.dart Show resolved Hide resolved
@annawatson-wk
Copy link
Contributor Author

@Workiva/release-management-p

Copy link
Contributor

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@rmconsole4-wk rmconsole4-wk merged commit 796c936 into master Oct 15, 2021
@rmconsole4-wk rmconsole4-wk deleted the CPLAT-15507-update branch October 15, 2021 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants